let setting = {};

// table字段
setting.columns = [
    {
        label: "姓名",
        prop: "name",
        width: 160,
    },
    {
        label: "性别",
        prop: "sex",
        width: 160,
    },
    {
        label: "班级",
        prop: "class",
        width: 160,
    },
    {
        label: "图片",
        prop: "image",
        width: 160,
        type: 'image'
    },
    {
        label: "地址",
        prop: "address",
        width: 160,
        tooltip: true
    },
    {
        label: "format",
        prop: "format",
        width: 160,
        formatter: function (row, column) {
            switch (row.format) {
                case '0':
                    return '启用'
                    break;
                case '1':
                    return '停用'
                    break;
            }
        }
    },
    {
        label: "tag",
        prop: "tag",
        width: 160,
        type: 'tag',
        tagFormatter: function (row, column) {
            switch (row.tag) {
                case '0':
                    return {label: '启 用', type: 'success'}
                    break;
                case '1':
                    return {label: '禁 用', type: 'danger'}
                    break;
            }
        }
    }
];
setting.rules = {
    name: [{
        required: true,
        message: "请输入",
        trigger: "blur"
    }],
    description: [{
        required: true,
        message: "请输入",
        trigger: "blur"
    }],
    startTime: [{
        required: true,
        message: "请选择",
        trigger: "change"
    }],
    endTime: [{
        required: true,
        message: "请选择",
        trigger: "change"
    }],
    self: [{
        required: true,
        message: "请输入",
        trigger: "blur"
    }],
    other: [{
        required: true,
        message: "请输入",
        trigger: "blur"
    }],
    superior: [{
        required: true,
        message: "请输入",
        trigger: "blur"
    }],
    departmentHead: [{
        required: true,
        message: "请输入",
        trigger: "blur"
    }],
}
setting.rules3 = {
    category: [{
        required: true,
        message: "请输入",
        trigger: "blur"
    }],
}
setting.rules7 = {
    reviewedPerson: [{
        required: true,
        message: "请选择",
        trigger: "change"
    }],
    reviewer: [{
        required: true,
        message: "请选择",
        trigger: "change"
    }],
}
export default setting;
